import { createAppContainer, createStackNavigator } from "react-navigation";

import SettingScreen from "../pages/Setting/index";
import MainTabNavigatorScreen from "./MainTabNavigator";

// See: https://reactnavigation.org/docs/zh-Hans/stack-navigator.html
const AppTabNavigator = createStackNavigator(
    {
        main: {
            screen: MainTabNavigatorScreen,
            navigationOptions: ({ navigation }: any) => ({
                header: null //设置页面有无标题
            })
        },
        setting: {
            screen: SettingScreen,
            navigationOptions: ({ navigation }: any) => ({
                header: null //设置页面有无标题
            })
        }
    },
    {
        initialRouteName: "main" // 设置 stack navigator 的默认页面， 必须是路由配置中的某一个。
    }
);
export default createAppContainer(AppTabNavigator);
